<template>
  <div class="dayrecommend">
    <div class="title">
      <div class="tit">今日推荐</div>
      <div class="more">
        <a @click="$router.push({ name: 'GoodsRecommend' })">
          更多<icon name="iconxiangyou" size="16" />
        </a>
      </div>
    </div>
    <div class="dayrecommend-box">
      <div class="goods-list">
        <goods-item1
          :goods="item"
          v-for="(item, index) in data.recommend"
          :key="index"
        />
      </div>
    </div>
  </div>
</template>

<script>
import GoodsItem1 from "@/components/GoodsItem/GoodsItem1.vue";
export default {
  name: "DayRecommend",
  components: { GoodsItem1 },
  props: {
    data: Object,
  },
};
</script>

<style lang="scss" scoped>
.dayrecommend {
  max-width: 1200px;
  margin: 0 auto 20px;
  .title {
    height: 33px;
    display: flex;
    align-items: flex-end;
    .tit {
      font-size: 24px;
      font-weight: 600;
      color: #333333;
      line-height: 33px;
      padding-right: 40px;
    }
    .link {
      a {
        font-size: 16px;
        font-weight: 400;
        color: #333333;
        line-height: 22px;
        text-decoration: none;
        margin-right: 16px;
        &:hover {
          color: #d52c1a;
        }
      }
    }
    .more {
      flex: 1;
      text-align: right;
      a {
        cursor: pointer;
        text-decoration: none;
        font-size: 16px;
        font-weight: 400;
        color: #333333;
        line-height: 22px;
      }
    }
  }
  .dayrecommend-box {
    margin-top: 26px;
    display: flex;
    .goods-list {
      flex: 1;
      font-size: 0;
      vertical-align: top;
      .ad {
        width: 224px;
        height: 397px;
        background: #ff7642;
        vertical-align: top;
        margin-bottom: 20px;
        display: inline-block;
      }
      & div:nth-child(5n + 1) {
        margin-left: 0;
      }
    }
  }
}
</style>
